<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>照片新增</title>
    <!--  抽取公共头部-->
    <div th:replace="admin/common :: head"></div>
</head>
<body>

<!--抽取公共导航栏-->
<div th:replace="admin/common :: menu(5)"></div>

<div class="m-padded-tb-hugex">
    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a href="#" class="teal active item">新增</a>
                <a href="#" th:href="@{/admin/violence}" class="item">列表</a>
            </div>
        </div>
    </div>
</div>

<!--中间内容-->
<div  class="m-container-small m-padded-tb-massive">
    <div class="ui container">
        <form action="#" th:action="@{/admin/violence}" method="post" class="ui form">
            <div class=" field">
                <div class="ui left labeled input m-margin-top">
                    <label class="ui teal basic label">暴行名称</label>
                    <input type="text" name="violencename" placeholder="暴行名称">
                </div>
                <div class="ui left labeled input m-margin-top">
                    <label class="ui teal basic label">暴行图片地址</label>
                    <input type="text" name="img" placeholder="暴行图片地址">
                </div>
            </div>


            <div class="ui error message"></div>
            <div class="ui right aligned container">
                <button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
                <button class="ui teal submit button">提交</button>
            </div>

        </form>
    </div>
</div>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<!--抽取公共底部栏-->
<div th:replace="admin/common :: #footer"></div>

<!--抽取公共js-->
<div th:replace="admin/common :: #js"></div>


<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on: 'hover'
    });

    $('.ui.form').form({
        fields: {
            violencename: {
                identifier: 'violencename',
                rules: [{
                    type: 'empty',
                    prompt: '请输入暴行名称'
                }]
            },
            img: {
                identifier: 'img',
                rules: [{
                    type: 'empty',
                    prompt: '请输入图片地址'
                }]
            }
        }
    });

</script>
</body>
</html>